package com.xywy.tangandroid.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.xywy.tangandroid.R;
import com.xywy.tangandroid.base.BaseActivity;

/*
 * 设置
 */
public class SettingAct extends BaseActivity {
	private RelativeLayout left_img;
	private TextView middle_title;
	private RelativeLayout person_acount_relat;
	private RelativeLayout person_push_notification_relat;
	private RelativeLayout person_clean_up_relat;
	private RelativeLayout person_about_relat;

	@Override
	protected void initView(Bundle savedInstanceState) {
		setContentView(R.layout.act_setting);

		left_img = (RelativeLayout) findViewById(R.id.left_img);
		middle_title = (TextView) findViewById(R.id.middle_title);
		middle_title.setText(getResources().getString(R.string.setting));

		person_acount_relat = (RelativeLayout) findViewById(R.id.person_acount_relat);
		person_push_notification_relat = (RelativeLayout) findViewById(R.id.person_push_notification_relat);
		person_clean_up_relat = (RelativeLayout) findViewById(R.id.person_clean_up_relat);
		person_about_relat = (RelativeLayout) findViewById(R.id.person_about_relat);
	}

	@Override
	protected void initListener() {
		left_img.setOnClickListener(this);
		person_acount_relat.setOnClickListener(this);
		person_push_notification_relat.setOnClickListener(this);
		person_clean_up_relat.setOnClickListener(this);
		person_about_relat.setOnClickListener(this);
	}

	@Override
	protected void initData() {

	}

	@Override
	public void onClick(View v) {
		super.onClick(v);
		switch (v.getId()) {
		case R.id.left_img:
			finish();
			break;
		case R.id.person_acount_relat:// 账户
			Intent intent1 = new Intent(this, AccountAct.class);
			startActivity(intent1);
			break;
		case R.id.person_push_notification_relat:// 通知推送
			Intent intent2 = new Intent(this, MessageSettingActivity.class);
			startActivity(intent2);
			break;
		case R.id.person_clean_up_relat:// 清理
			Intent intent3 = new Intent(this, ClearCacheAct.class);
			startActivity(intent3);
			break;
		case R.id.person_about_relat:// 关于糖大夫
			Intent intent4 = new Intent(this, AboutAct.class);
			startActivity(intent4);
			break;
		default:
			break;
		}

	}

}
